from __future__ import with_statement
import sys
sys.path.append("/home/stefan/Documents/fydp/fydp-david/module-test/fydp-david/src")
import gdb
import audio_stop_range
import pyata_module


class StopAudioRangeCommand (gdb.Command):

    def __init__ (self):
        super (StopAudioRangeCommand, self).__init__ ("audio stoprng",
                                                       gdb.COMMAND_SUPPORT,
                                                       gdb.COMPLETE_FILENAME)

    def invoke (self, arg, from_tty):
		bp = AudioStopRange(arg)
		print "LAST-RANGE-START=" + str(pyata_module.getLastRangeStart())
		temp = pyata_module.getLastRangeStart()
		bp.setStartNumber(temp)
		print "audio range stopping at"
		print arg
	

StopAudioRangeCommand ()
